<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateOcpcXiaomiLogTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('ocpc_xiaomi_log', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('oaid',100)->default('')->comment('oaid');
            $table->string('imei',40)->default('')->comment('imei');
            $table->unsignedInteger("pay_amount")->default(0)->comment("金额：分");
            $table->string('pkg', 20)->default('')->comment("回传结果");
            $table->string('res', 100)->default('')->comment("包名");
            $table->unsignedTinyInteger("type")->default(1)->comment("1：激活；2：注册;3:充值");
            $table->integer('user_id')->default(0)->comment('用户ID');
            $table->tinyInteger('is_register')->default(0)->comment('是否是当天注册 1是 0不是');
            $table->timestamps();
            $table->comment('小米推广回传日志');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('ocpc_xiaomi_log');
    }
}
